<!--发帖路由-->
<script setup>

import {PostUtils} from "@/assets/js/PostUtils";
import {ref, watch} from "vue";
import PostForm from "@/components/post/PostForm.vue";

const getPrepareParam = (route) => {
  return PostUtils.buildPrepareParams(route.name, Object.assign({}, route.query, route.params))
}

const text = ref("asd")

const goBack = () => {
  window.history.back();
}

watch(text, (nv) => {
  console.log(nv)
})
</script>

<template>
  <div>
    <div style="text-align: left">
      <post-form :action="$route.name" :params="Object.assign({},$route.query,$route.params)" @prepare-error="goBack"/>
    </div>
  </div>
</template>

<style scoped>

</style>